using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EasyIot.WinApp
{
    static class Program
    {
        /// <summary>
        ///  The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //
            // 
            LogHelper.StartCatchAppException();
            LogHelper.AppendLog("[Info] FoodBox Run "); 
            // 
            DataMgr.Serial_Lock = ConfigurationManager.AppSettings["Serial_Lock"]; 
            DataMgr.ServerIP = ConfigurationManager.AppSettings["ServerIP"];
            DataMgr.ServerPort = Convert.ToInt32(ConfigurationManager.AppSettings["ServerPort"]);
            DataMgr.ApiUrl = ConfigurationManager.AppSettings["ApiUrl"]; 
            //
            DataMgr.MainHandle = new MainForm(); 
            //
            Application.Run(DataMgr.MainHandle);
        }
    }
}
